package com.dolphin.business.manager.impl;

import com.dolphin.business.common.utils.PagerModel;
import com.dolphin.business.entity.GoodsBuyResponse;
import com.dolphin.business.manager.AbstractManager;
import com.dolphin.business.manager.GoodsBuyResponseManager;

public class GoodsBuyResponseManagerImpl extends AbstractManager implements GoodsBuyResponseManager {

	@Override
	public void addGoodsBuyResponse(GoodsBuyResponse goodsBuyResponse) {

		getHibernateTemplate().save(goodsBuyResponse);
	}

	@Override
	public void delGoodsBuyResponseById(String id) {

		getHibernateTemplate().delete(findGoodsBuyResponseById(id));
	}

	@Override
	public PagerModel findAllGoodsBuyResponse() {

		return searchPaginate("select gbr from GoodsBuyResponse gbr");
	}

	@Override
	public GoodsBuyResponse findGoodsBuyResponseById(String id) {

		return (GoodsBuyResponse)getHibernateTemplate().load(GoodsBuyResponse.class, id);
	}

	@Override
	public void updateGoodsBuyResponse(GoodsBuyResponse goodsBuyResponse) {

		getHibernateTemplate().update(goodsBuyResponse);
	}

}
